﻿<?xml version="1.0" encoding="UTF-8"?>
<quartz xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 				version="1.0"
				overwrite-existing-jobs="true">
  <!--一个日程是由一个job和一个trigger组成，代表任务定义和时间定义-->
  <job>
    <!--任务定义-->
    <job-detail>
      <!--任务名称-->
      <name>SendMailJob</name>
      <!--Jobs 和Triggers也可以被放入“组”中。“组”对于后续维护过程中，分类管理Jobs和Triggers非常有用。Jobs和Triggers的名字在组中必须唯一，换句话说，Jobs和Triggers真实名字是它的名字+组-->
      <group>jobGroup1</group>
      <!--任务描述-->
      <description>jobDesciption1</description>
      <!--任务实现类名，任务实现所在文件夹-->
      <job-type>Web.QuartzJob.SendEmailJob,Web</job-type>
      <!--Volatility（无常性）-如果一个Job是无常的,在重新启动Quartz i scheduler 时它不能被保持-->
      <volatile>false</volatile>
      <!--Durability（持久性）-如果一个Job是不持久的， 一旦没有触发器与之关联，它就会被从scheduler 中自动删除。-->
      <durable>true</durable>
      <!--RequestsRecovery（请求恢复能力） -如果一个Job具备“请求恢复”能力，当它在执行时遇到scheduler “硬性的关闭”（例如：执行的过程崩溃，或者计算机被关机），那么当scheduler重新启动时，这个任务会被重新执行。-->
      <recover>false</recover>
    </job-detail>
    <trigger>
      <!--标签(触发器)定义-->
      <cron>
        <name>cronSendMail</name>
        <group>cronGroup</group>
        <job-name>SendMailJob</job-name>
        <!--触发器和任务进行关联-->
        <job-group>jobGroup1</job-group>
        <start-time>1982-06-28T18:15:00+02:00</start-time>
        <!--开始时间-->
        <cron-expression>0 0/1 * * * ?</cron-expression>
        <!--Cron表达式知识-->
      </cron>
    </trigger>
  </job>

  <!--清理附件表中的垃圾数据-->
  <job>
    <job-detail>
      <name>AttachmentClearJob</name>
      <group>AttachmentClearJob</group>
      <description>AttachmentClearJob</description>
      <job-type>Web.QuartzJob.AttachmentClearJob, Web</job-type>
      <volatile>false</volatile>
      <durable>true</durable>
      <recover>false</recover>
    </job-detail>
    <trigger>
      <cron>
        <name>AttachmentClearJob</name>
        <group>AttachmentClearJob</group>
        <job-name>AttachmentClearJob</job-name>
        <job-group>AttachmentClearJob</job-group>
        -->
  <!--<start-time>1982-06-28T18:15:00+02:00</start-time>-->
        <cron-expression>0 0 12 * * ?</cron-expression>
      </cron>
    </trigger>
  </job>

  <!--清理过期的日志数据-->
  <job>
    <job-detail>
      <name>LogClearJob</name>
      <group>LogClearJob</group>
      <description>LogClearJob</description>
      <job-type>Web.QuartzJob.LogClearJob, Web</job-type>
      <volatile>false</volatile>
      <durable>true</durable>
      <recover>false</recover>
    </job-detail>
    <trigger>
      <cron>
        <name>LogClearJob</name>
        <group>LogClearJob</group>
        <job-name>LogClearJob</job-name>
        <job-group>LogClearJob</job-group>
        -->
        <!--<start-time>1982-06-28T18:15:00+02:00</start-time>-->
        <cron-expression>0 0 12 * * ?</cron-expression>
      </cron>
    </trigger>
  </job>
  
  
  <!--<job>
    <job-detail>
      <name>LocalSystemSMSSenderJob</name>
      <group>Aware</group>
      <description>本地系统待办信息定时发送作业，每5分钟执行一次。</description>
      <job-type>Application.Web.Job.LocalSystemSMSSenderJob, Application.Web</job-type>
      <volatile>false</volatile>
      <durable>true</durable>
      <recover>false</recover>
    </job-detail>
    <trigger>
      <cron>
        <name>LocalSystemSMSSenderCron</name>
        <group>Aware</group>
        <job-name>LocalSystemSMSSenderJob</job-name>
        <job-group>jobGroup1</job-group>
        -->
  <!--<start-time>1982-06-28T18:15:00+02:00</start-time>-->
  <!--
        <cron-expression>0 0/5 * * * ?</cron-expression>
      </cron>
    </trigger>
  </job>

  <job>
    <job-detail>
      <name>IntegrateSystemSMSSenderJob</name>
      <group>Aware</group>
      <description>集成系统待办信息定时发送作业，每天8:30和13:30各发送一次。</description>
      <job-type>Application.Web.Job.IntegrateSystemSMSSenderJob, Application.Web</job-type>
      <volatile>false</volatile>
      <durable>true</durable>
      <recover>false</recover>
    </job-detail>
    <trigger>
      <cron>
        <name>IntegrateSystemSMSSenderCron</name>
        <group>Aware</group>
        <job-name>IntegrateSystemSMSSenderJob</job-name>
        <job-group>jobGroup1</job-group>
        -->
  <!--<start-time>1982-06-28T18:15:00+02:00</start-time>-->
  <!--
        <cron-expression>0 30 8,13 * * ?</cron-expression>
      </cron>
    </trigger>
  </job>-->


  <!--<job>

    <job-detail>
      <name>SendMailJob</name>
      <group>jobGroup1</group>
      <description>jobDesciption1</description>
      <job-type>Application.Web.Components.QuartzTest.SendMailJob, Application.Web</job-type>
      <volatile>false</volatile>
      <durable>true</durable>
      <recover>false</recover>
      <job-data-map>
        <entry>
          <key>smtp_host</key>
          <value>mail.cnpc.com.cn</value>
        </entry>
        <entry>
          <key>recipient</key>
          <value>dengzhiguo@cnpc.com.cn</value>
        </entry>
        <entry>
          <key>sender</key>
          <value>hp2@cnpc.com.cn</value>
        </entry>
        <entry>
          <key>subject</key>
          <value>test quartz</value>
        </entry>
        <entry>
          <key>message</key>
          <value>Hi,I'm quartzer,thank you!!</value>
        </entry>
      </job-data-map>
    </job-detail>
  
    <trigger>
      -->
  <!--<simple>
        <name>simpleName</name>
        <group>simpleGroup</group>
        <description>SimpleTriggerDescription</description>
        <misfire-instruction>SmartPolicy</misfire-instruction>
        <calendar-name>cal1</calendar-name>
        <volatile>false</volatile>
        <job-name>jobName1</job-name>
        <job-group>jobGroup1</job-group>
        <start-time>1982-06-28T18:15:00.0Z</start-time>
        <end-time>2010-05-04T18:13:51.0Z</end-time>
        <repeat-count>100</repeat-count>
        <repeat-interval>3000</repeat-interval>
      </simple>-->
</quartz>

